document.addEventListener('DOMContentLoaded', function() {
    const resumes = document.querySelectorAll('.resume');
    let currentResumeIndex = 0;

    // 隐藏所有简历，除了第一个
    resumes.forEach((resume, index) => {
        if (index !== currentResumeIndex) {
            resume.style.display = 'none';
        }
    });

    // 添加事件监听器到所有“下一个简历”按钮
    document.querySelectorAll('.next-resume-btn').forEach(button => {
        button.addEventListener('click', function() {
            resumes[currentResumeIndex].style.display = 'none';
            currentResumeIndex = (currentResumeIndex + 1) % resumes.length;
            resumes[currentResumeIndex].style.display = 'block';
        });
    });
});